[NET] back: Add TSO support
This patch adds TCP Segmentation Offload (TSO) support to the backend.
It also advertises this fact through xenbus so that the frontend can
detect this and send through TSO requests only if it is supported.
This is done using an extra request slot which is indicated by a flag
in the first slot. In future checksum offload can be done in the same
way.
The extra request slot must not be generated if the backend does not
support the appropriate feature bits. For now this is simply feature-tso.
If the frontend detects the presence of the appropriate feature bits,
it may generate TX requests which have the appropriate request flags
set that indicates the presence of an extra request slot with the extra
information.
On the backend the extra request slot is read if and only if the request
flags are set in the TX request.
This protocol allows more feature bits to be added in future without
breaking compatibility. At least the hardware checksum bit is planned.
Even though only TSO is supported for now the code actually supports
GSO so it can be applied to any other protocol. The only missing bit
is the detection of host support for a specific GSO protocol. Once that
is added we can advertise all supported protocols to the guest.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Keir Fraser <keir@xensource.com>